var與let、const的區別 var與let、const 一、var聲明的變量會掛載在window上,而let和const聲明的變量不會: 二、var聲明變量存在變量提升,let和const不存在變量提升 ...